﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;
using System.Web.Mvc;

namespace MVCMusicStore.Models
{
    [MetadataType(typeof(AlbumMetadata))]
    public partial class Album
    {
        [Bind(Exclude="AlbumId")]
        public class AlbumMetadata
        {
            public object AlbumId { get; set; }
            [DisplayName("Genre")]
            public object GenreId { get; set; }
            [DisplayName("Artist")]
            public object ArtistId { get; set; }
            [Required(ErrorMessage="Album title is required")]
            [StringLength(160)]
            public object Title { get; set; }
            [DisplayName("Album Art Url")]
            [StringLength(1024)]
            public object AlbumArtUrl { get; set; }
            [Required(ErrorMessage="Price is required")]
            [Range(0.01, 100.00,ErrorMessage="Price must be between 0.01 and 100.00")]
            public object Price { get; set; }
        }
    }
}